package learn.letcode.tree;

public class TestTree {
    public static void main(String[] args) {
//        TreeNode<String> root1 = new TreeNode<String>("中国");
//        TreeNode<String> r1 = new TreeNode<String>("四川");
//        TreeNode<String> r2 = new TreeNode<String>("广东");
//        TreeNode<String> r3 = new TreeNode<String>("成都");
//        TreeNode<String> r4 = new TreeNode<String>("泸州");
//        TreeNode<String> r5 = new TreeNode<String>("广州");
//        root1.addChildNode(r1);
//        root1.addChildNode(r2);
//        r1.addChildNode(r3);
//        r1.addChildNode(r4);
//        r2.addChildNode(r5);
//        root1.display(root1, 2);

        FolderOO folderOO = new FolderOO("111111","","文件夹");
        FolderOO folderOO1 = new FolderOO("111112","111111","文件夹1");
        FolderOO folderOO2 = new FolderOO("111113","111111","文件夹2");
        FolderOO folderOO3 = new FolderOO("111114","111112","文件夹1-1");
        FolderOO folderOO4 = new FolderOO("111115","111112","文件夹1-2");

        FileOO fileOO = new FileOO("aaaaaaaa","111113","hello.jpg");
        FileOO fileOO1 = new FileOO("aaaaaaaa","111114","world.jpg");


        TreeNode<FolderOO> root = new TreeNode<>(folderOO);
        TreeNode<FolderOO> c1 = new TreeNode<>(folderOO1);
        TreeNode<FolderOO> c2 = new TreeNode<>(folderOO2);
        TreeNode<FolderOO> c3 = new TreeNode<>(folderOO3);
        TreeNode<FolderOO> c4 = new TreeNode<>(folderOO4);

        root.addChildNode(c1);
        root.addChildNode(c2);
        c1.addChildNode(c3);
        c1.addChildNode(c4);

        root.display(root,2);



    }
}
